package com.ruoyi.consume.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.consume.mapper.GraftingclipConsumeMapper;
import com.ruoyi.consume.domain.GraftingclipConsume;
import com.ruoyi.consume.service.IGraftingclipConsumeService;

/**
 * 查看领用信息Service业务层处理
 *
 * @author ruoyi
 * @date 2021-07-23
 */
@Service
public class GraftingclipConsumeServiceImpl implements IGraftingclipConsumeService
{
    @Autowired
    private GraftingclipConsumeMapper graftingclipConsumeMapper;

    /**
     * 查询查看领用信息
     *
     * @param graftingclipConsumeId 查看领用信息ID
     * @return 查看领用信息
     */
    @Override
    public GraftingclipConsume selectGraftingclipConsumeById(Long graftingclipConsumeId)
    {
        return graftingclipConsumeMapper.selectGraftingclipConsumeById(graftingclipConsumeId);
    }

    /**
     * 查询查看领用信息列表
     *
     * @param graftingclipConsume 查看领用信息
     * @return 查看领用信息
     */
    @Override
    public List<GraftingclipConsume> selectGraftingclipConsumeList(GraftingclipConsume graftingclipConsume)
    {
        return graftingclipConsumeMapper.selectGraftingclipConsumeList(graftingclipConsume);
    }

    /**
     * 新增查看领用信息
     *
     * @param graftingclipConsume 查看领用信息
     * @return 结果
     */
    @Override
    public int insertGraftingclipConsume(GraftingclipConsume graftingclipConsume)
    {
        graftingclipConsume.setCreateTime(DateUtils.getNowDate());
        return graftingclipConsumeMapper.insertGraftingclipConsume(graftingclipConsume);
    }

    /**
     * 修改查看领用信息
     *
     * @param graftingclipConsume 查看领用信息
     * @return 结果
     */
    @Override
    public int updateGraftingclipConsume(GraftingclipConsume graftingclipConsume)
    {
        graftingclipConsume.setUpdateTime(DateUtils.getNowDate());
        return graftingclipConsumeMapper.updateGraftingclipConsume(graftingclipConsume);
    }

    /**
     * 批量删除查看领用信息
     *
     * @param graftingclipConsumeIds 需要删除的查看领用信息ID
     * @return 结果
     */
    @Override
    public int deleteGraftingclipConsumeByIds(Long[] graftingclipConsumeIds)
    {
        return graftingclipConsumeMapper.deleteGraftingclipConsumeByIds(graftingclipConsumeIds);
    }

    /**
     * 删除查看领用信息信息
     *
     * @param graftingclipConsumeId 查看领用信息ID
     * @return 结果
     */
    @Override
    public int deleteGraftingclipConsumeById(Long graftingclipConsumeId)
    {
        return graftingclipConsumeMapper.deleteGraftingclipConsumeById(graftingclipConsumeId);
    }

    /**
     * 获取用户下拉框
     *
     * @param
     * @return 结果
     */
    @Override
    public List<GraftingclipConsume> getUserName(){
        return graftingclipConsumeMapper.getUserName();
    }
}
